<?php

namespace App\Models;


use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;

/**
 * App\Models\Member
 *
 * @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member query()
 * @mixin \Eloquent
 * @property int $id
 * @property string $phone 手机
 * @property string|null $name 昵称
 * @property string $password 密码
 * @property string|null $avatar 头像
 * @property string|null $autograph 签名
 * @property string|null $remember_token 记住我
 * @property string $uuid
 * @property float $useable_bonus_money 奖金池-可用奖金余额
 * @property float $total_bonus_money 奖金池-历史总共获取奖金
 * @property float $total_share_money 累计消费奖励
 * @property float $useable_share_money 可用消费奖励
 * @property float $card_money 充值卡-总的可用充值卡金额
 * @property float $card_money_coupon 充值卡-总的可用充值卡消费劵金额
 * @property string|null $deleted_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereAvatar($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereCardMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereCardMoneyCoupon($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member wherePassword($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member wherePhone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereRememberToken($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereTotalBonusMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereUseableBonusMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Member whereUuid($value)
 */
class Member extends Authenticatable implements JWTSubject
{
    use Notifiable;

    protected $table = 'members';

    protected $fillable = ['phone','name','password','avatar','remember_token','uuid', 'useable_bonus_money',"autograph", "useable_share_money" , "total_share_money"];
    protected $hidden = ['password','remember_token'];


    public function getJWTIdentifier()
    {
        return $this->getKey();
    }


    public function getJWTCustomClaims()
    {
        return [];
    }
}
